package com.example.login.Mapper;

import com.example.login.Pojo.User;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface UserMap {
    @Select("select * from xtshop_user where username=#{username}")
    User getUserByName(String userName);
    @Insert("insert into xtshop_user (username,file,passwords,vip,state) values(#{username},'',#{password},0,0)")
    void Register(String username,String password);
    @Update("update xtshop_user set state=1 where id = #{id}")
    void login(int id);
    @Update("update xtshop_user set username=#{username} where id=#{user_id}")
    void updateName(String username,int user_id);
}
